import request from '@/utils/request'

export function getFulltime() {

    var timeStr = "-"
    var curDate = new Date()
    var curYear = curDate.getFullYear();  //获取完整的年份(4位,1970-????)
    var curMonth = (curDate.getMonth() + 1) < 10 ? '0' + (curDate.getMonth() + 1) : (curDate.getMonth() + 1);  //获取当前月份(0-11,0代表1月)
    var curDay = curDate.getDate() < 10 ? '0' + curDate.getDate() : curDate.getDate();       //获取当前日(1-31)
    var curHour = curDate.getHours() < 10 ? '0' + curDate.getHours() : curDate.getHours();      //获取当前小时数(0-23)
    var curMinute = curDate.getMinutes() < 10 ? '0' + curDate.getMinutes() : curDate.getMinutes();   // 获取当前分钟数(0-59)
    var curSec = curDate.getSeconds() < 10 ? '0' + curDate.getSeconds() : curDate.getSeconds();      //获取当前秒数(0-59)
    var Current = curYear + timeStr + curMonth + timeStr + curDay + ' ' + curHour + ':' + curMinute + ':' + curSec;
    return Current;

}

export function getTime() {

    var timeStr = "-"
    var curDate = new Date()
    var curYear = curDate.getFullYear();  //获取完整的年份(4位,1970-????)
    var curMonth = (curDate.getMonth() + 1) < 10 ? '0' + (curDate.getMonth() + 1) : (curDate.getMonth() + 1);  //获取当前月份(0-11,0代表1月)
    var curDay = curDate.getDate() < 10 ? '0' + curDate.getDate() : curDate.getDate();       //获取当前日(1-31)

    var Current = curYear + timeStr + curMonth + timeStr + curDay;
    return Current;

}

